package com.springboot.test.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.springboot.test.entity.MessageTemplateEntity;
import com.springboot.test.entity.mapper.MessageTemplateMapper;
import org.springframework.stereotype.Service;

@Service
public class MessageTemplateService extends ServiceImpl<MessageTemplateMapper, MessageTemplateEntity> {


    public MessageTemplateEntity getOneByCode(Integer type){
        return getOne(new QueryWrapper<MessageTemplateEntity>().lambda().eq(MessageTemplateEntity::getMessageType,type));
    }
}
